home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-11 | 15.6 KB | 765 lines | [TEXT/MPS ] |
- /*
- File: SoundEditor.r
-
- Contains: SoundEditor Resources
-
- Written by: Steve Smith
-
- Copyright: © 1994,95 by Apple Computer, Inc., all rights reserved.
- */
-
- #define SystemSevenOrBetter 1 // we want the extended types
- #define SystemSevenOrLater 1 // Types.r uses this variable
-
- // -- MPW Rez Includes --
-
- #include "Types.r"
- #include "SysTypes.r"
- #include "CodeFragmentTypes.r"
-
- // -- OpenDoc Includes --
-
- #ifndef __ODTYPES_R__
- #include "ODTypes.r"
- #endif
-
- #ifndef SOM_Module_OpenDoc_StdDefs_defined
- #include "StdDefs.xh"
- #endif
-
- // -- Sound Editor Includes --
-
- #ifndef _SOUNDEDITORDEF_
- #include "SoundEditorDef.h"
- #endif
-
- #ifndef _SOUNDEDITORVERS_
- #include "SoundEditorVers.h"
- #endif
-
- //------------------------------------------------------------------------------
- // .rsrc resources
- //------------------------------------------------------------------------------
-
- // SoundEditor - This gets the resources from my .rsrc file (PICTs etc.)
- include "SoundEditorOtherResources.rsrc";
-
- #include "SoundEditorAETE.r";
- #include "SoundEditorBalloons.r";
-
- //------------------------------------------------------------------------------
- // Version Resources
- //------------------------------------------------------------------------------
-
- resource 'vers' (1)
- {
- currentMajorVersion,
- finderMinorVersion,
- developmentStage,
- preReleaseNumber,
- verUS,
- shortVersionStr,
- shortVersionStr", © Apple Computer, Inc. 1994-1995"
- };
-
- resource 'vers' (2)
- {
- currentMajorVersion,
- finderMinorVersion,
- developmentStage,
- preReleaseNumber,
- verUS,
- "",
- "OpenDoc™ Sample Code"
- };
-
- //------------------------------------------------------------------------------
- // cfrg Resource
- //------------------------------------------------------------------------------
-
- resource 'cfrg' (0)
- {
- { /* [1] */
- #ifdef _68KBUILD_
- kMotorola,
- #else
- kPowerPC,
- #endif
- kFullLib,
- currentVersion,
- compatibleVersion,
- kDefaultStackSize,
- kNoAppSubFolder,
- kIsLib,
- kOnDiskFlat,
- kZeroOffset,
- kWholeFork,
- kSoundEditorID, /* this must be the class ID */
-
- /* [2] */
- #ifdef _68KBUILD_
- kMotorola,
- #else
- kPowerPC,
- #endif
- kFullLib,
- currentVersion,
- compatibleVersion,
- kDefaultStackSize,
- kNoAppSubFolder,
- kIsLib,
- kOnDiskFlat,
- kZeroOffset,
- kWholeFork,
- kPartClassName /* this must be the part class name */
- }
- };
-
- //------------------------------------------------------------------------------
- // NMAP Resources
- //------------------------------------------------------------------------------
-
- // Map a part's kind (unique content identifier)
- // to a generic content category identifier
- resource kODNameMappings (kKindCategoryMapId)
- {
- kODKind,
- { /* array Types: 3 elements */
- /* [1] */
- kSoundEditorKind,
- kODIsAnISOStringList
- {
- { /* array ClassIDs: 1 elements */
- /* [1] */
- kODCategorySampledSound
- }
- }
- }
- };
-
- // Map a part's class id (module::classname)
- // to a part's kind (unique content identifier)
- resource kODNameMappings (kEditorKindMapId)
- {
- kODEditorKinds,
- { /* array Types: 3 elements */
- /* [1] */
- kSoundEditorID,
- kODIsAnISOStringList
- {
- {
- kSoundEditorKind
- }
- }
- }
- };
-
- // Map a part's class id (module::classname)
- // to a human-readable string.
- resource kODNameMappings (kEditorUserStringMapId)
- {
- kODEditorUserString,
- { /* array Types: 1 elements */
- /* [1] */
- kSoundEditorID,
- kODIsINTLText
- {
- smRoman,
- langEnglish,
- kSoundEditorUserString
- }
- }
- };
-
- // Map a part's kind (unique content identifier)
- // to a human readable string.
- resource kODNameMappings (kKindUserStringMapId)
- {
- kODKindUserString,
- { /* array Types: 3 elements */
- /* [1] */
- kSoundEditorKind,
- kODIsINTLText
- {
- smRoman,
- langEnglish,
- kSoundEditorKindUserString
- }
- }
- };
-
- // Map a part's kind (unique content identifier)
- // to an old style MacOS Type (and/or ScrapType)
- resource kODNameMappings (kOldMacOSTypeMapId)
- {
- kODKindOldMacOSType,
- { /* array KeyList: 1 elements */
- /* [1] */
- kSoundEditorKind,
- kODIsMacOSType {
- kSoundEditorDocumentOSType
- }
- }
- };
-
- // Map a part's class id (module::classname) to
- // the data/file OSTypes the part supports.
- resource kODNameMappings (kPlatformEditorKindMapId)
- {
- kODEditorPlatformKind,
- { /* array KeyList: 1 elements */
- /* [1] */
- kSoundEditorID,
- kODIsPltfmTypeSpac
- {
- /* array PltfmTypeSpacList: 2 elements */
- {
- /* [1] */
- kODPlatformFileType,
- kSoundFileKind,
- smRoman,
- langEnglish,
- kSoundFileKindUserString,
- kODCategorySampledSound,
- /* [2] */
- kODPlatformDataType,
- kSoundDataKind,
- smRoman,
- langEnglish,
- kSoundDataKindUserString,
- kODCategorySampledSound,
- }
- }
- }
- };
-
- //------------------------------------------------------------------------------
- // String List Resources
- //------------------------------------------------------------------------------
-
- resource 'STR#' (kMenuStringResID, "Menu Items strings")
- {
- {
- /* [1] */
- "About SoundEditor…",
- }
- };
-
- resource 'STR#' (kErrorStringResID, "Error strings")
- {
- {
- /* [1] */
- "“SoundEditor” was unable to completely initialize it’s internal structures.",
-
- /* [2] */
- "“SoundEditor” was unable to open the document due to unforseen circumstances.",
-
- /* [3] */
- "“SoundEditor” was unable to open a part window due to unforseen circumstances.",
-
- /* [4] */
- "“SoundEditor” has been asked to remove a frame that does not belong to it, "
- "or an error occurred while removing the frame from internal storage.",
-
- /* [5] */
- "The “Sound Editor” was unable to access the clipboard at this time. Please "
- "wait a moment and try performing the operation again.",
-
- /* [6] */
- "The “Sound Editor” was unable to allocate the memory required to complete the "
- "requested action. Please try again later.",
-
- /* [7] */
- "“Sound Editor” was unable to initialize the Sound Manager properly. You will "
- "be unable to play sounds temporarily.",
-
- /* [8] */
- "“Sound Editor” was unable to initialize the Sound Input Manager properly. "
- "You will be unable to record sounds temporarily.",
-
- /* [9] */
- "“Sound Editor” was previously unable to initialize the Sound Manager "
- "properly.",
-
- /* [10] */
- "“Sound Editor” was previously unable to initialize the Sound Input Manager "
- "properly.",
-
- /* [11] */
- "The “Sound Editor” cannot play the sound at this time because another editor "
- "is using the speaker.",
-
- /* [12] */
- "The “Sound Editor” cannot record a new sound at this time because another "
- "editor is using the microphone.",
-
- /* [13] */
- "The “Sound Editor” was unable to play the sound at this time due to unforseen "
- "circumstances.",
-
- /* [14] */
- "The “Sound Editor” was unable to record a new sound at this time due to "
- "unforseen circumstances.",
-
- /* [15] */
- "The “Sound Editor” was unable to play a sound because there is no sound to "
- "play.",
-
- /* [16] */
- "The “Sound Editor” was unable to record a new sound at this time because "
- "another editor is in its modal state.",
-
- /* [17] */
- "A window that “Sound Editor” created has been deleted without its knowledge. "
- "This may generate a fatal error in the near future. Please close the "
- "document immediately to prevent data loss.",
-
- /* [18] */
- "“Sound Editor” encountered a fatal error while trying to save. Try saving "
- "again or closing the document."
- }
- };
-
- //-------------------------------------------------------------------------------------
- // Finder Related Resources
- //-------------------------------------------------------------------------------------
-
- // Kind resources affect the text Finder displays in the
- // "kind" column and file info dialog. This feature was
- // introduced as part of Macintosh Easy Open.
-
- resource 'kind' (kBaseResourceID)
- {
- kSoundEditorOSType,
- 0, /* region = USA */
- {
- 'shlb', "OpenDoc™ editor"
- }
- };
-
- resource 'kind' (kBaseResourceID+1)
- {
- kSoundViewerOSType,
- 0, /* region = USA */
- {
- 'shlb', "OpenDoc™ viewer"
- }
- };
-
- resource 'kind' (kBaseResourceID+2)
- {
- kODShellSignature,
- 0, /* region = USA */
- {
- kSoundEditorDocumentOSType, "SoundEditor 1.0 document",
- kSoundEditorStationeryOSType, "SoundEditor 1.0 stationery"
- }
- };
-
- // The -16397 string will be displayed by Finder when a user
- // tries to open the editor shared library. The string should
- // give the user a little detail about the part's capabilities
- // and enough information to install the part in the correct location.
-
- resource 'STR ' (-16397, purgeable)
- {
- "OpenDoc editor\n"
- "\n"
- "“Sound Editor” records and plays sampled sounds. To work properly, it "
- "should be placed in the Editors folder. To create a new document, open "
- "a stationery pad."
- };
-
- //------------------------------------------------------------------------------
- // Dialog Resources
- //------------------------------------------------------------------------------
-
- resource 'DLOG' (kAboutBoxID, "SoundEditor About Box")
- {
- { 0, 0, 250, 350 },
- dBoxProc,
- invisible,
- goAway,
- 0x0,
- kAboutBoxID,
- "",
- alertPositionMainScreen
- };
-
- resource 'DITL' (kAboutBoxID)
- {
- {
- /* [1] */
- {222, 270, 242, 338}, Button { enabled, "OK" },
- /* [2] */
- {24, 25, 56, 57}, Icon { disabled, kEditorIconPicture },
- /* [3] */
- {13, 68, 237, 69}, Button { disabled, "" },
- /* [4] */
- {64, 13, 65, 337}, Button { disabled, "" },
- /* [5] */
- {46, 76, 62, 172}, StaticText { disabled, "SoundEditor" },
- /* [6] */
- {76, 76, 116, 304}, StaticText { disabled,
- "SoundEditor is a simple Macintosh™ sound editor sample. "
- "It illustrates some of the basic content handling functionality "
- "which part editors provide." },
- /* [7] */
- {124, 76, 162, 304}, StaticText { disabled,
- "Written by Steve Smith, Andrey Dolgachev, and Troy Gaul "
- "with support from the OpenDoc™ Engineering team." },
- /* [8] */
- {172, 76, 200, 300}, StaticText { disabled,
- "Copyright© 1994,1995 by Apple Computer, "
- "Inc. All Rights Reserved." },
- /* [9] */
- {51, 272, 64, 340}, StaticText { disabled,
- "Version "shortVersionStr },
- /* [10] */
- {0,0,0,0}, HelpItem {
- disabled,
- HMScanhdlg
- {kAboutBoxID}
- }
- }
- };
-
- resource 'dctb' (kAboutBoxID)
- {
- /* dialog background fill color */
- { /* array ColorSpec: 5 elements */
- /* [1] */
- wContentColor, 59127, 59127, 59127,
- /* [2] */
- wFrameColor, 0, 0, 0,
- /* [3] */
- wTextColor, 0, 0, 0,
- /* [4] */
- wHiliteColor, 0, 0, 0,
- /* [5] */
- wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- data 'ictb' (kAboutBoxID) {
- /* dialog control text styling */
- $"0000000000000000002800240028"
- $"004C80070074800700888007009C"
- $"800700B0800700C4000000000000"
- $"000300007FFF7FFF7FFF0001FFFF"
- $"FFFFFFFF00020000000000000003"
- $"FFFFFFFFFFFF0000000000000003"
- $"00007FFF7FFF7FFF0001FFFFFFFF"
- $"FFFF00020000000000000003FFFF"
- $"FFFFFFFF00D80100000E00000000"
- $"0000FFFFFFFFFFFF000000E10000"
- $"0009000000000000FFFFFFFFFFFF"
- $"000000E800000009000000000000"
- $"FFFFFFFFFFFF000000EF00000009"
- $"000000000000FFFFFFFFFFFF0000"
- $"00F600000009000000000000FFFF"
- $"FFFFFFFF00000850616C6174696E"
- $"6F0647656E6576610647656E6576"
- $"610647656E6576610647656E6576"
- $"61"
- };
-
- resource 'DLOG' (kErrorBoxID, "SoundEditor Error Box")
- {
- {57, 46, 244, 374},
- dBoxProc,
- invisible,
- goAway,
- 0x0,
- kErrorBoxID,
- "",
- alertPositionParentWindowScreen
- };
-
- resource 'DITL' (kErrorBoxID)
- {
- { /* array DITLarray: 5 elements */
- /* [1] */
- {153, 256, 173, 314}, Button { enabled, "OK" },
- /* [2] */
- {153, 185, 173, 243}, Button { enabled, "Cancel" },
- /* [3] */
- {11, 70, 124, 317}, StaticText { disabled,
- "<< Use this for errors in the Editor, su"
- "ch as out of memory, unable to acquire s"
- "ome system resource, etc.>> \nUser errors"
- " use a standard alert appearance. See DI"
- "TL 129.>>" },
- /* [4] */
- {11, 19, 43, 51}, Picture { disabled, kEditorIconPicture },
- /* [5] */
- {149, 252, 177, 318}, UserItem { disabled },
- /* [6] */
- {0,0,0,0}, HelpItem {
- disabled,
- HMScanhdlg
- {kErrorBoxID}
- }
- }
- };
-
- resource 'DLOG' (kSettingsDialogID, "Settings Dialog")
- {
- {79, 101, 217, 303},
- dBoxProc,
- invisible,
- noGoAway,
- 0x0,
- kSettingsDialogID,
- "Settings",
- alertPositionParentWindowScreen
- };
-
- resource 'DITL' (kSettingsDialogID)
- {
- {
- /* [1] */
- {105, 131, 125, 189},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {105, 60, 125, 118},
- Button {
- enabled,
- "Cancel"
- },
- /* [3] */
- {10, 20, 42, 52},
- Picture {
- disabled,
- kBaseResourceID
- },
- /* [4] */
- {20, 69, 33, 181},
- StaticText {
- disabled,
- "Recording Quality:"
- },
- /* [5] */
- {37, 70, 55, 176},
- Control {
- enabled,
- kGoodControl
- },
- /* [6] */
- {55, 70, 73, 176},
- Control {
- enabled,
- kBetterControl
- },
- /* [7] */
- {73, 70, 91, 176},
- Control {
- enabled,
- kBestControl
- },
- /* [8] */
- {102, 128, 128, 192},
- UserItem {
- disabled
- },
- /* [9] */
- {0,0,0,0}, HelpItem {
- disabled,
- HMScanhdlg
- {kSettingsDialogID}
- }
- }
- };
-
- resource 'dctb' (kSettingsDialogID)
- {
- { /* array ColorSpec: 5 elements */
- /* [1] */
- wContentColor, 65535, 65535, 65535,
- /* [2] */
- wFrameColor, 0, 0, 0,
- /* [3] */
- wTextColor, 0, 0, 0,
- /* [4] */
- wHiliteColor, 0, 0, 0,
- /* [5] */
- wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- data 'ictb' (kSettingsDialogID)
- {
- $"0000 0000 0000 0000 0000 0000 0002 0020"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0001 0100 000A 0000 0000 0000 0000 0000"
- $"0000 0000"
- };
-
- data 'finf' (kDialogFontInfoID, "Dialog Font Info")
- {
- $"0001 0003 0000 000A"
- };
-
- resource 'CNTL' (kGoodControl, "Good")
- {
- {37, 70, 55, 176},
- 0,
- visible,
- 1,
- 0,
- radioButProcUseWFont,
- 0,
- "Good"
- };
-
- resource 'CNTL' (kBetterControl, "Better")
- {
- {55, 70, 73, 176},
- 0,
- visible,
- 1,
- 0,
- radioButProcUseWFont,
- 0,
- "Better"
- };
-
- resource 'CNTL' (kBestControl, "Best")
- {
- {73, 70, 91, 176},
- 0,
- visible,
- 1,
- 0,
- radioButProcUseWFont,
- 0,
- "Best"
- };
-
- //------------------------------------------------------------------------------
- // Menu Resource
- //------------------------------------------------------------------------------
-
- resource 'MENU' (kSoundMenuID)
- {
- kSoundMenuID,
- textMenuProc,
- 0x7FFFFFEF,
- enabled,
- "Sound",
- {
- "Play", noIcon, noKey, noMark, plain,
- "Pause", noIcon, noKey, noMark, plain,
- "Stop", noIcon, noKey, noMark, plain,
- "Record", noIcon, noKey, noMark, plain,
- "-", noIcon, noKey, noMark, plain,
- "Settings…", noIcon, noKey, noMark, plain
- }
- };
-
- //------------------------------------------------------------------------------
- // Finder Bundle Information
- //------------------------------------------------------------------------------
-
- resource 'BNDL' (kDocumentBundle, "Document BNDL")
- {
- kODShellSignature,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'FREF',
- { /* array IDArray: 2 elements */
- /* [1] */
- 0, kDocumentFREF,
- /* [2] */
- 1, kStationeryFREF
- },
- /* [2] */
- 'ICN#',
- { /* array IDArray: 2 elements */
- /* [1] */
- 0, kDocumentIcons,
- /* [2] */
- 1, kStationeryIcons
- }
- }
- };
-
- resource 'BNDL' (kEditorBundle, "Editor BNDL")
- {
- kSoundEditorOSType,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'FREF',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kEditorFREF
- },
- /* [2] */
- 'ICN#',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kEditorIcons
- }
- }
- };
-
- resource 'BNDL' (kViewerBundle, "Viewer BNDL")
- {
- kSoundViewerOSType,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'FREF',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kViewerFREF
- },
- /* [2] */
- 'ICN#',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kViewerIcons
- }
- }
- };
-
- resource 'FREF' (kDocumentFREF)
- {
- kSoundEditorDocumentOSType, 0, ""
- };
-
- resource 'FREF' (kStationeryFREF)
- {
- kSoundEditorStationeryOSType, 1, ""
- };
-
- resource 'FREF' (kEditorFREF)
- {
- 'shlb', 0, ""
- };
-
- resource 'FREF' (kViewerFREF)
- {
- 'shlb', 0, ""
- };
-
- data kODShellSignature (0, "Owner resource")
- {
- $"00"
- };
-
- data kSoundViewerOSType (0, "Owner resource")
- {
- $"00"
- };
-
- data kSoundEditorOSType (0, "Owner resource")
- {
- $"00"
- };
-